//
//  UIViewController+XJHud.h
//  XJProgressHUD
//
//  Created by 石显军 on 2019/12/16.
//  Copyright © 2019 石显军. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <JGProgressHUD/JGProgressHUD.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (XJHud)

@property (nonatomic, strong, nullable) JGProgressHUD *xj_hud;

/**
 Show the loading
 */
- (void)xj_showLoading;
- (void)xj_showLoadingMessage:(NSString * _Nullable)message;
- (void)xj_showLoadingMessage:(NSString * _Nullable)message inView:(UIView *)view;

/**
 Dismisses the loading animated.
 */
- (void)xj_dismiss;
- (void)xj_dismissAnimated:(BOOL)animated;
- (void)xj_dismissAfterDelay:(NSTimeInterval)delay;
- (void)xj_dismissAfterDelay:(NSTimeInterval)delay animated:(BOOL)animated;

/**
 Show the Progress
 */
- (void)xj_showProgress;
- (void)xj_showProgressMessage:(NSString * _Nullable)message;
- (void)xj_showProgressMessage:(NSString * _Nullable)message inView:(UIView *)view;
- (void)xj_updateProgressWithValue:(CGFloat)progressValue;

/**
 show error message
 */
- (void)xj_showErrorMessage:(NSString *)message;
- (void)xj_showErrorMessage:(NSString *)message inView:(UIView *)view;

/**
 show success message
 */
- (void)xj_showSuccessMessage:(NSString *)message;
- (void)xj_showSuccessMessage:(NSString *)message inView:(UIView *)view;

/**
 show bottom center message
 */
- (void)xj_showBottomMessage:(NSString *)message;
- (void)xj_showBottomMessage:(NSString *)message inView:(UIView *)view;

/**
 show center message
 */
- (void)xj_showCenterMessage:(NSString *)message;
- (void)xj_showCenterMessage:(NSString *)message inView:(UIView *)view;


/**
 show top center message
 */
- (void)xj_showTopMessage:(NSString *)message;
- (void)xj_showTopMessage:(NSString *)message inView:(UIView *)view;

@end

NS_ASSUME_NONNULL_END
